class AdminController < ApplicationController
  layout "admin" 
  
  before_filter :authorize_admin
  
  def index
    session[:date] = Date.today if !session[:date] || params[:today]
    #if params[:move]
    #  session[:date] = session[:date] + params[:move].to_i  
    #end
	if params[:move]
		case params[:move].to_i
		when 0
			session[:date] = params[:seldate].to_date 
		else
			session[:date] = session[:date] + params[:move].to_i
		end  
	end	
    @all_users = User.find(:all)
  end
end
